package com.dkm.orproject.dkmoa.service.serviceimpl.jurisdiction;

import com.dkm.orproject.dkmoa.dao.OaJurisdictionRoleMapper;
import com.dkm.orproject.dkmoa.domain.OaJurisdictionRole;
import com.dkm.orproject.dkmoa.service.jurisdiction.OaJurisdictionRoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 *  @ClassName : OaJurisdictionRoleServiceImpl  //类名
 *  @Description :   //描述
 *  @Author : 石智诚  //作者
 *  @Date: 2020-08-18 15:09  //时间
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class OaJurisdictionRoleServiceImpl implements OaJurisdictionRoleService {
    @Resource
    OaJurisdictionRoleMapper mapper;
    @Override
    public int deleteById(Long pkJurisdictionRoleId) {
        return mapper.deleteByPrimaryKey(pkJurisdictionRoleId);
    }

    @Override
    public int insert(OaJurisdictionRole record) {
        return mapper.insertSelective(record);
    }

    @Override
    public OaJurisdictionRole selectByPrimaryKey(Long pkJurisdictionRoleId) {
        return mapper.selectByPrimaryKey(pkJurisdictionRoleId);
    }

    @Override
    public int update(OaJurisdictionRole record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<OaJurisdictionRole> findAll() {
        return mapper.findAll();
    }
}
